#!/bin/bash
cat > /etc/my.cnf <<EOF
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character-set-server=utf8
symbolic-links=0
max_allowed_packet=20M

[mysql]
default-character-set=utf8

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

[client]
default-character-set=utf8

!includedir /etc/my.cnf.d
EOF